Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regression on route paths with colons #1675

Merged
merged 1 commit into from Jun 4, 2022
Merged

Conversation

florimondmanca
Copy link
Member

@florimondmanca florimondmanca commented Jun 4, 2022

Fixes tiangolo/fastapi#4892 which was introduced in 0.18.0 via #1322.

Narrower alternative to #1657, that also reorganizes tests introduced by #1322 so that the "'Host' header matching should ignore ports" behavior is clearer.

(Matching when host string and requested Host have the exact same :port is the intuitive case. What's special is Starlette matches even in case of absent or different port in Host.)

@florimondmanca florimondmanca requested review from Kludex and a team June 4, 2022 10:59
Copy link
Sponsor Member

@Kludex Kludex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. 👍

@florimondmanca florimondmanca changed the title Fix regression on route names with colons Fix regression on route path with colons Jun 4, 2022
@florimondmanca florimondmanca changed the title Fix regression on route path with colons Fix regression on route paths with colons Jun 4, 2022
@Kludex
Copy link
Sponsor Member

Kludex commented Jun 4, 2022

We can add a co-author when squashing for the original author. That's what I usually do, but act as you like. 🙏

@florimondmanca
Copy link
Member Author

I can add @bodograumann as a co-author then. :)

@florimondmanca florimondmanca merged commit b588ebe into master Jun 4, 2022
@florimondmanca florimondmanca deleted the fm/route-colons branch June 4, 2022 16:14
@aminalaee aminalaee mentioned this pull request Jun 4, 2022
@bodograumann
Copy link
Contributor

Thanks for merging this fix. I'm really happy this project is so active!

@Kludex
Copy link
Sponsor Member

Kludex commented Jun 7, 2022

Thank you for bringing a solution right away! 🎉

This will be available on Starlette 0.20.2, which is going to be released today. JFYK :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When a url contains colon, it makes 404 response. After I upgrade fastapi from 0.75.0 to 0.77.1.
3 participants